﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Save2openExcel2007
{
    public partial class sLogin : Form
    {
        private libs lib = new libs();
        private string post = "-1";
        public sLogin()
        {
            InitializeComponent();
        }

        private void sSubmit_Click(object sender, EventArgs e)
        {
            string name = sName.Text;
            string pwd = sPwd.Text;
            if (name == "" && pwd == "")
            {
                MessageBox.Show("用户名或者密码输入错误");
            }
            else
            {
                this.post = "?name=" + name + "&" + "pwd=" + pwd + "&type=excel";
                if (lib.savePost(post) == "-1")
                {
                    MessageBox.Show("保存用户名密码错误，请检查系统！");
                }
                this.Close();
            }
        }
        public string getPost()
        {
            return this.post;
        }
    }
}
